import type { Metadata } from "next"; import Link from "next/link"; import { getLocale } from "@/lib/i18n/server"; import { fmtDate, href, t } from "@/lib/i18n"; import { timeline } from "@/lib/papers/queries"; export const revalidate = 300; export async function generateMetadata(): Promise { const d = t(await getLocale()); return { title: d.timeline.title, description: d.timeline.lead, alternates: { canonical: "/timeline" } }; } export default async function TimelinePage() { const locale = await getLocale(); const d = t(locale); const rows = await timeline(); const byMonth = new Map(); for (const r of rows) { const k = (r.vdate ?? r.released ?? "unknown").slice(0, 7); (byMonth.get(k) ?? byMonth.set(k, []).get(k)!).push(r); } const months = [...byMonth.keys()].sort().reverse(); const max = Math.max(1, ...months.map((m) => byMonth.get(m)!.length)); return (

{d.timeline.title}

{d.timeline.lead}

{[...months].reverse().map((m, i) => { const n = byMonth.get(m)!.length; const h = (n / max) * 100; const rel = byMonth.get(m)!.filter((r) => r.version_no === 1).length; return {m}{n}; })}

{d.timeline.releases} + {d.timeline.revisions} · {d.timeline.releases}

    {months.map((m) =>
  1. {fmtDate(locale, m + "-01", "month")}

      {byMonth.get(m)!.map((r) =>
    • {r.identifier}{r.version_no === 1 ? d.home.newRelease : d.home.revision} · {r.label}{r.title}
    • )}
  2. )}
); }